package anji.plus.system.mark.service;

import anji.plus.system.mark.base.IBaseService;
import anji.plus.system.mark.domain.TaskList;
import anji.plus.system.mark.dto.RankInfo;
//import anji.plus.system.mark.dto.TaskListAndNode;
import anji.plus.system.mark.vo.*;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 任务表 服务类
 * </p>
 *
 * @author luwei
 * @since 2023-11-08
 */
public interface ITaskListService extends IBaseService<TaskList> {

    /***
     * @Description:  查询任务列表
     * @Author: zhouchong
     * @Date: 2023/11/10 13:30
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    List<TaskList> queryTaskList(String name, LocalDate monthFirstDay, LocalDate nextMonthFirstDay, String departNum);


    /***
     * @Description:  任务确认审核 失败
     * @Author: zhouchong
     * @Date: 2023/11/10 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    TaskList ConfirmReviewFail(String taskId, String confirmReviewUser, String reviewStatus, String confirmReason, String isChange);

    /***
     * @Description:  任务确认审核 成功
     * @Author: zhouchong
     * @Date: 2023/11/10 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    TaskList ConfirmReviewPass(String taskId, String confirmReviewUser, String reviewStatus , String confirmReason, String isChange);

    /***
     * @Description:  任务确认审核 流转其他人审核
     * @Author: zhouchong
     * @Date: 2023/11/10 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/

    TaskList ConfirmChange(String taskId, String changeReviewUser, String reviewStatus, String confirmChangeMark, String isChange);

    /***
     * @Description:  任务完成审核 成功
     * @Author: zhouchong
     * @Date: 2023/11/10 13:06
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    TaskList completeReviewPass(String taskId, String completeReviewUser, String reviewStatus, String completeReason, String isChange);

    /***
     * @Description:  任务完成审核 驳回
     * @Author: zhouchong
     * @Date: 2023/11/10 13:06
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    TaskList completeReviewFail(String taskId, String completeReviewUser, String reviewStatus, String completeReason, String isChange);

    /***
     * @Description:  任务完成审核-流转
     * @Author: zhouchong
     * @Date: 2023/12/11 13:06
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/

    TaskList completeChange(String taskId, String changeReviewUser, String reviewStatus, String completeChangeMark, String isChange);

    /***
     * @Description:  任务新增
     * @Author: zhouchong
     * @Date: 2023/11/13 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    void addTask(TaskListVo taskListVo);

    /***
     * @Description:  审核页面-需审核查询
     * @Author: zhouchong
     * @Date: 2023/11/10 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    List<TaskList> queryNeedReviewTask(String name);


    /***
     * @Description:  审核页面-待审核查询
     * @Author: zhouchong
     * @Date: 2023/11/10 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    List<TaskList> queryWaitReviewTask(String name);


    /***
     * @Description:  审核页面-已驳回查询
     * @Author: zhouchong
     * @Date: 2023/11/10 13:45
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.domain.TaskList>
     * @Version: 1.0
     **/
    List<TaskList> queryRejectTask(String name);


    /***
     * @Description:  更新任务进度，或提交完成
     * @Author: zhouchong
     * @Date: 2023/11/13 18:15
     * @Param name:
     * @return: java.util.List<anji.plus.system.mark.vo.TaskListVoUpdate>
     * @Version: 1.0
     **/
    void taskUpdate(TaskListVoUpdate taskListVoUpdate);


    void NodeCompleteUpdate(TaskListVoCompleteUpdate taskListVoCompleteUpdate);


    //查询用户得分-默认当月
    Double queryUserScore(String name, LocalDate monthFirstDate, LocalDate nextMonthday);
    //查询用户任务数-默认当月
    Integer queryUserTaskNum(String name, LocalDate monthFirstDate, LocalDate nextMonthday);
    //查询用户积分-rank排名
    List<RankInfo> userScoreRank(LocalDate monthFirstDate, LocalDate nextMonthday);

    //查询用户得分-默认当月
    Double queryUserScheduleTime(String name, LocalDate monthFirstDate, LocalDate nextMonthday);


    //定时任务-更新超时任务状态
    void jobTaskUpdate();

    //微信首页查询
    IndexQuery indexQuery(String name, LocalDate monthFirstDate, LocalDate nextMonthday, String departNum);

    //PC首页查询
    List<RankInfo> indexQuerypc(String name, LocalDate monthFirstDate, LocalDate nextMonthday, String departNum);

    //查询用户得分-默认当月-新版
    Double queryUserScoreNew(String name, LocalDate monthFirstDate, LocalDate nextMonthfirstday);

    //首页查询合并-新
    IndexQuery indexQueryNew(String name, LocalDate monthFirstDate, LocalDate nextMonthfirstday);

    //查询用户得分-默认当月-新版
    List<RankInfo> userScoreRankNew(LocalDate monthFirstDay, LocalDate nextMonthfirstday);

    void scoreUpdate(TaskListVoCompleteUpdate taskListVoCompleteUpdate);

    List<RankInfo> userScoreRank2(LocalDate monthFirstDay, LocalDate nextMonthfirstday, String departNum);


    List<RankInfo> userScoreRank2pc(String name, LocalDate monthFirstDay, LocalDate nextMonthfirstday, String departNum);

//    String userAuditTask(String name);
}



